package code.generation;

import java.util.HashMap;
import java.util.Map;

import code.parser.Clazz;
import code.parser.Method;
import code.parser.Struct;

public class MethodSerializeJsonCplusplus implements MethodSerialize {
	
	private Map<String, Struct> mStructMap = new HashMap<String, Struct>();

	public MethodSerializeJsonCplusplus(Map<String,Struct> structmap) {
		this.mStructMap  = structmap;
	}
	@Override
	public String call(Method method) {
		
		return null;
	}

	@Override
	public String callback(Method method) {
		// TODO Auto-generated method stub
		
		
		
		return toJson(method,mStructMap);
	}
//	Packet pack;
//
//	cJSON* jo1 = cJSON_CreateObject();
//	cJSON_AddNumberToObject(jo1, "action", MspRspLoginResponse);
//	cJSON* msg = cJSON_CreateObject();
//	cJSON_AddNumberToObject(msg, "iStatus", tRsp.status);
//	cJSON_AddNumberToObject(msg, "iUserID", tRsp.userID);
//	cJSON_AddStringToObject(msg,"sName",tRsp.name.c_str());
//	cJSON_AddStringToObject(msg,"sAvatar",tRsp.headerUri.c_str());
//	cJSON_AddItemToObject(jo1,"msg",msg);
//
//	char * jsonString = cJSON_PrintUnformatted(jo1);
//	LOGI(MS_UNITY_ADAPTER, "LoginResponse %s", jsonString);
//	int size = strlen(jsonString);
//	memcpy(pack.data,jsonString,size);
//	pack.size = size;
//	recvJsonMsg(&pack);
//	cJSON_Delete(jo1);
	
	private String toJson(Method method, Map<String, Struct> mStructMap) {
		
		

		
		return null;
	}
	@Override
	public String include(Clazz clazz) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String sign(Method method) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String callbackSign() {
		// TODO Auto-generated method stub
		return null;
	}
	
}
